At this point, you could use your website as is and
just continue adding web pages, folders, and other content. However, IIS
Manager offers a number of features and settings that enable you
control your website and to customize its look and feel. For example,
you can stop and start the website, change the default name of the site,
and specify the default content page.
Stopping Your Website
By default, when you
start Windows 7, the World Wide Web Publishing Service starts
automatically, and that service automatically starts your website. This
is reasonable behavior because in most cases you’ll want your website
available full time (that is, as long as the Windows 7 computer is
running). However, there might be occasions when you don’t want your
site to be available:
If you plan on making major edits to the content, you might prefer to take the site offline while you make the changes.
You might only want your website available at certain times of the day.
If you’re developing a web application, certain changes may require that you stop and then restart the website.
For these and similar situations, you can stop the website. Here are the steps to follow:
1. | Open IIS Manager.
|
2. | Select Computer, Sites, Default Web Site (where Computer is the name of the computer running IIS).
|
3. | In
the Actions pane, click Stop. (You can also right-click Default Web
Site and then select Manage Web Site, Stop.) IIS Manager stops the
website.
|
Tip
If you’d
prefer that your website not start automatically when you log on to
Windows 7, select Default Web Site, and then click Advanced Settings in
the Actions pane. (You can also right-click Default Web Site, and then
click Advanced Settings.) In the Start Automatically setting, select
False, and then click OK.
If you only want your
website to not start the next time you launch Windows 7, stop the site
and then shut down Windows 7. When you next log on to Windows 7, your
website won’t start. Note, however, that if you then restart the website
during the Windows 7 session, the website will start automatically the
next time you start Windows 7.
Restarting Your Website
When you’re ready to get your website back online, follow these steps to restart it:
1. | Open IIS Manager.
|
2. | Select Computer, Sites, Default Web Site (where Computer is the name of the computer running IIS).
|
3. | In
the Actions pane, click Start. (You can also right-click Default Web
Site and then select Manage Web Site, Start.) IIS Manager starts the
website.
|
Tip
If your website is stuck
or behaving erratically, you can often solve the problem by stopping and
restarting the site. However, instead of performing two separate
operations—clicking Stop and then clicking Start—IIS Manager lets you
perform both actions in one shot by clicking Restart.
Renaming the Default Website
The name Default Web Site
is innocuous enough, I suppose, but it’s a bit on the bland side. If
you prefer to use a more interesting name, follow these steps to change
it:
1. | Open IIS Manager.
|
2. | Open the Computer, Sites branch (where Computer is the name of the computer running IIS).
|
3. | Right-click Default Web Site, and then click Rename in the shortcut menu. IIS Manager adds a text box around the name.
|
4. | Type the new name for the website.
|
5. | Press Enter.
|
Caution
When you rename the
site, the new name can be up to 259 characters long, but you must be
sure to not use any of the following illegal characters:
@ $ & = + | \ ; : “ ’ , < > / ?
Changing the Website Location
By default, your website’s home folder is the wwwroot
folder, but that isn’t necessarily permanent. You may decide to move
the website to a different home folder, or you may decide to rename the
existing folder. In either case, you must use IIS Manager to specify the
new home folder. Here are the steps to follow:
1. | Open IIS Manager.
|
2. | Open the Computer, Sites branch (where Computer is the name of the computer running IIS).
|
3. | Select Default Web Site.
|
4. | Click Features View.
|
5. | In the Actions pane, click Basic Settings to open the Edit Web Site dialog box, shown in Figure 1.
|
6. | To specify the website’s new home folder, you have three choices:
If the folder exists and you know the full pathname (drive and folders), type it in the Physical Path text box. If
the folder exists and you’re not sure of the full pathname (or it’s too
long to type), click the Browse (...) button, use the Browse for Folder
dialog box to select the folder, and then click OK. If
the folder doesn’t exist, click Browse (...), use the Browse for Folder
dialog box to select the folder within which you want the new folder to
appear, click Make New Folder, type the folder name, press Enter, and
then click OK.
|
7. | Click OK. |